// 一维数组区间都加上一个数
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 1e5 + 10;
int n, m;
int a[N];
LL f[N]; // 差分数组
int main(){
    cin >> n;
    for(int i = 1; i <= n; ++i){
        cin >> a[i];
        f[i] += a[i];
        f[i+1] -= a[i];
    }
    cin >> m;
    while(m--){
        LL l, r, k; cin >> l >> r >> k;
        f[l] += k;
        f[r+1] -= k;
    }
    
    // 还原原始数组
    for(int i = 1; i <= n; ++i){
        f[i] += f[i-1];
        cout << f[i] << " ";
    }
    return 0;
}